<?php
	class ShopfoodareaModel extends Model{

		/**
		 * 添加商家送餐范围
		 * Enter description here ...
		 * @param unknown_type $data
		 */
		public function addShopfoodarea($data){
			return $this->add($data);
		}
		
		/**
		 * 删除商家送餐范围
		 * Enter description here ...
		 * @param unknown_type $ids
		 */
		public function deleteShopfoodarea($ids){
			//防误操作
	    	$ids = is_array($ids) ? $ids : explode(',', $ids);
	    	foreach($ids as $k => $v) {
	    		if ( !is_numeric($v) ) unset($ids[$k]);
	    	}
	    	if ( empty($ids) ) return false;
	    	
	    	$map[id] = array('in', $ids);
	    	//user
    		$this->where($map)->delete();
    		return true;
		}
	}

?>